{extend name="Layout/datagrid" /}
{block name="content_header"}        
<h1>
    会员积分
    <small>advanced tables</small>
</h1>
<ol class="breadcrumb">
    <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
    <li><a href="#">会员</a></li>
    <li class="active">会员积分</li>
</ol>
{/block}
{block name="content"}
<div class="box">
    <div class="box-header">
        <ul class="nav nav-tabs">
            {foreach name="tabs" item="vo"}
            <li class="{$vo.active}"><a href="{:U($vo['url'])}">{$vo.title}</a></li>
            {/foreach}
        </ul>
    </div>
    <!-- /.box-header -->
    <div class="box-body">
        <div class="row">
            <div class="col-md-5">
                <!-- form start -->
                <form action="{:U('editSave')}" method="post" class="form-horizontal">
                    <div class="box-body">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">积分变更</label>
                            <div class="col-sm-9">
                                <input type="number" name="number" class="form-control input-sm" placeholder="积分变更数量" required="required" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">变更类型</label>
                            <div class="col-sm-9">
                                {xshtml:radio name="type" data='array("1"=>"奖励","0"=>"惩罚")' /}
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">全部会员</label>
                            <div class="col-sm-9">
                                <label class="checkbox-inline"><input type="checkbox" name="allusers" value="1">&nbsp;</label>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">用户组</label>
                            <div class="col-sm-9">
                                {xshtml:checkbox name="group[]" data="array('1'=>'1组','2'=>'2组')" /}
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">用户等级</label>
                            <div class="col-sm-9">
                                {xshtml:checkbox name="level[]" data="array('1'=>'青铜','2'=>'黄金')" /}
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">标题</label>
                            <div class="col-sm-9">
                                <input type="text" name="title" class="form-control input-sm" placeholder="标题（写个标题，方便在历史记录中追溯）" value="{$data.title}" required="required" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">变更原因</label>
                            <div class="col-sm-9">
                                <div class="input-group">
                                    <textarea name="reson" class="form-control input-sm" placeholder="变更原因" cols="90" rows="3"></textarea>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- /.box-body -->
                    <div class="box-footer">
                        <button type="button" class="btn btn-default xsui-btn-close-dialog">取消</button>
                        <button type="submit" class="btn btn-primary pull-right">保存</button>
                    </div>
                    <!-- /.box-footer -->
                    <input type="hidden" name="id" value="{$data.id}"/>
                </form>
            </div>
        </div>
    </div>
    {/block}
    {block name="script_before"}
    <script>
        $('select[name="category_id"]').ajaxcombobox({first: {id: "", text: "选择货币"}});
    </script>
    {/block}